/* Define to 1 if you have the `dcgettext' function. */
#mesondefine HAVE_DCGETTEXT
-/* Define to 1 if you have the declaration of `isinf', and to 0 if you don't.
- */
-#mesondefine HAVE_DECL_ISINF
-
-/* Define to 1 if you have the declaration of `isnan', and to 0 if you don't.
- */
-#mesondefine HAVE_DECL_ISNAN
-
-/* Define to 1 if you have the declaration of `isnanf', and to 0 if you don't.
- */
-#mesondefine HAVE_DECL_ISNANF
-
/* Define to 1 if you have the <dlfcn.h> header file. */
#mesondefine HAVE_DLFCN_H
/* Define to 1 if you have a working `mmap' system call. */
#mesondefine HAVE_MMAP
-/* Define to 1 if you have the `nearbyint' function. */
-#mesondefine HAVE_NEARBYINT
-
/* Define to 1 if you have the `posix_fallocate' function. */
#mesondefine HAVE_POSIX_FALLOCATE
/* Have the Xrandr 1.5 extension library */
#mesondefine HAVE_RANDR15
-/* Define to 1 if you have the `rint' function. */
-#mesondefine HAVE_RINT
-
-/* Define to 1 if you have the `round' function. */
-#mesondefine HAVE_ROUND
-
/* Define to 1 if you have the `sincos' function. */
#mesondefine HAVE_SINCOS
-/* Define to 1 if you have the `log2` function */
-#mesondefine HAVE_LOG2
-
-/* Define to 1 if you ahve the `exp2` function */
-#mesondefine HAVE_EXP2
-
/* Define to 1 if you have the <stdint.h> header file. */
#mesondefine HAVE_STDINT_H
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * Copyright (C) 2011 Chun-wei Fan <fanc999@yahoo.com.tw>
- *
- * Author: Chun-wei Fan <fanc999@yahoo.com.tw>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <float.h>
-
-#ifndef HAVE_DECL_ISNAN
-/* it seems of the supported compilers only
- * MSVC does not have isnan(), but it does
- * have _isnan() which does the same as isnan()
- */
-static inline gboolean
-isnan (double x)
-{
- return _isnan (x);
-}
-#endif
-
-#ifndef HAVE_DECL_ISINF
-/* Unfortunately MSVC does not have finite()
- * but it does have _finite() which is the same
- * as finite() except when x is a NaN
- */
-static inline gboolean
-isinf (double x)
-{
- return (!_finite (x) && !_isnan (x));
-}
-#endif
-
-/* Workaround for round() for non-GCC/non-C99 compilers */
-#ifndef HAVE_ROUND
-static inline double
-round (double x)
-{
- if (x >= 0)
- return floor (x + 0.5);
- else
- return ceil (x - 0.5);
-}
-#endif
#include "gdkintl.h"
#include "gdkkeysprivate.h"
-/* for the use of round() */
-#include "fallback-c89.c"
-
/**
* SECTION:gdkdevice
* @Short_description: Object representing an input device
#include <math.h>
#include <glib.h>
-/* for the use of round() */
-#include "fallback-c89.c"
-
/**
* SECTION:gdkdisplay
* @Short_description: Controls a set of monitors and their associated input devices
#include <errno.h>
#include <math.h>
-#include "fallback-c89.c"
-
/**
* SECTION:rgba_colors
* @Short_description: RGBA colors
#include <epoxy/gl.h>
-/* for the use of round() */
-#include "fallback-c89.c"
-
#ifdef GDK_WINDOWING_WAYLAND
#include "wayland/gdkwayland.h"
#endif
#include <cairo-win32.h>
#include <dwmapi.h>
#include <math.h>
-#include "fallback-c89.c"
static void gdk_surface_win32_finalize (GObject *object);
+++ /dev/null
-/* GTK - The GIMP Toolkit
- * Copyright (C) 2011 Chun-wei Fan <fanc999@yahoo.com.tw>
- *
- * Author: Chun-wei Fan <fanc999@yahoo.com.tw>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "config.h"
-
-#include <math.h>
-#include <float.h>
-
-/* Workaround for round() for non-GCC/non-C99 compilers */
-#ifndef HAVE_ROUND
-static inline double
-round (double x)
-{
- if (x >= 0)
- return floor (x + 0.5);
- else
- return ceil (x - 0.5);
-}
-#endif
-
-/* Workaround for rint() for non-GCC/non-C99 compilers */
-#ifndef HAVE_RINT
-static inline double
-rint (double x)
-{
- if (ceil (x + 0.5) == floor (x + 0.5))
- {
- int a;
- a = (int) ceil (x);
- if (a % 2 == 0)
- return ceil (x);
- else
- return floor (x);
- }
- else
- {
- if (x >= 0)
- return floor (x + 0.5);
- else
- return ceil (x - 0.5);
- }
-}
-#endif
-
-#ifndef HAVE_NEARBYINT
-/* Workaround for nearbyint() for non-GCC/non-C99 compilers */
-/* This is quite similar to rint() in most respects */
-
-static inline double
-nearbyint (double x)
-{
- return floor (x + 0.5);
-}
-#endif
-
-#ifndef HAVE_DECL_ISINF
-/* Unfortunately MSVC does not have finite()
- * but it does have _finite() which is the same
- * as finite() except when x is a NaN
- */
-static inline gboolean
-isinf (double x)
-{
- return (!_finite (x) && !_isnan (x));
-}
-#endif
-
-#ifndef HAVE_DECL_ISNAN
-/* it seems of the supported compilers only
- * MSVC does not have isnan(), but it does
- * have _isnan() which does the same as isnan()
- */
-static inline gboolean
-isnan (double x)
-{
- return _isnan (x);
-}
-#endif
-
-#ifndef HAVE_DECL_ISNANF
-#if defined (__GNUC__)
-/* gcc has an intern function that it warns about when
- * using -Wshadow but no header properly declares it,
- * so we do it instead.
- */
-extern int isnanf (float x);
-#else
-static inline int
-isnanf (float x)
-{
- /* Either use the C99 type infering macro, or the fallback from above.
- * MSVC has _isnanf, but only on x64
- */
- return isnan (x);
-}
-#endif
-#endif
-
-#ifndef INFINITY
-/* define INFINITY for compilers that lack support for it */
-# ifdef HUGE_VALF
-# define INFINITY HUGE_VALF
-# else
-# define INFINITY (float)HUGE_VAL
-# endif
-#endif
-
-#ifndef HAVE_LOG2
-/* Use a simple implementation for log2() for compilers that lack it */
-static inline double
-log2 (double x)
-{
- return log (x) / log (2.0);
-}
-#endif
-
-#ifndef HAVE_EXP2
-/* Use a simple implementation for exp2() for compilers that lack it */
-static inline double
-exp2 (double x)
-{
- return pow (2.0, x);
-}
-#endif
#include "gtkcssvalueprivate.h"
#include "gtktypebuiltins.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
/*** PARSING ***/
static gboolean
#include "gtkprivatetypebuiltins.h"
#include "gtkprivate.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
enum {
PROP_0,
PROP_ANIMATED,
#include "gtkintl.h"
#include "gtkprivatetypebuiltins.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
/* the actual parsers we have */
#include "gtkcssarrayvalueprivate.h"
#include "gtkcssbgsizevalueprivate.h"
#include <cairo-gobject.h>
#include <string.h>
-#include "fallback-c89.c"
-
/**
* SECTION:gtkentry
* @Short_description: A single line text entry field
#include "gdk/gdktextureprivate.h"
#include "gdk/gdkprofilerprivate.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
/**
* SECTION:gtkicontheme
* @Short_description: Looking up icons by name
#include "config.h"
#include "gtkkineticscrollingprivate.h"
+#include <math.h>
#include <stdio.h>
-#include "fallback-c89.c"
-
/*
* All our curves are second degree linear differential equations, and
* so they can always be written as linear combinations of 2 base
#include <math.h>
#include <string.h>
-/* this is in case rint() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
/**
* SECTION:gtklabel
* @Short_description: A widget that displays a small to medium amount of text
#include "a11y/gtklevelbaraccessible.h"
-#include "fallback-c89.c"
-
enum {
PROP_VALUE = 1,
PROP_MIN_VALUE,
#include "gtktypebuiltins.h"
#include <math.h>
-#include "fallback-c89.c"
/**
* SECTION:gtknumericsorter
float num1 = g_value_get_float (&value1);
float num2 = g_value_get_float (&value2);
- if (isnanf (num1) && isnanf (num2))
+ if (isnan (num1) && isnan (num2))
result = GTK_ORDERING_EQUAL;
- else if (isnanf (num1))
+ else if (isnan (num1))
result = self->sort_order == GTK_SORT_ASCENDING ? GTK_ORDERING_LARGER : GTK_ORDERING_SMALLER;
- else if (isnanf (num2))
+ else if (isnan (num2))
result = self->sort_order == GTK_SORT_ASCENDING ? GTK_ORDERING_SMALLER : GTK_ORDERING_LARGER;
else if (num1 < num2)
result = self->sort_order == GTK_SORT_ASCENDING ? GTK_ORDERING_SMALLER : GTK_ORDERING_LARGER;
#include <string.h>
-#include "fallback-c89.c"
-
/**
* SECTION:gtkprogressbar
* @Short_description: A widget which indicates progress visually
#include "gsk/gskroundedrectprivate.h"
#include <gdk/gdktextureprivate.h>
-#include "fallback-c89.c"
-
static void
gtk_do_render_icon (GtkStyleContext *context,
cairo_t *cr,
#include "gsk/gskroundedrectprivate.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
static void
gtk_theming_background_snapshot_color (GtkCssBoxes *boxes,
GtkSnapshot *snapshot,
#include "gsk/gskroundedrectprivate.h"
-/* this is in case round() is not provided by the compiler,
- * such as in the case of C89 compilers, like MSVC
- */
-#include "fallback-c89.c"
-
typedef struct _GtkBorderImage GtkBorderImage;
struct _GtkBorderImage {
#include "gtkwidgetprivate.h"
#include "gtkbuildable.h"
-#include "fallback-c89.c"
-
/**
* SECTION:gtkrevealer
* @Short_description: Hide and show with animation
#include "a11y/gtkswitchaccessible.h"
-#include "fallback-c89.c"
-
typedef struct _GtkSwitchClass GtkSwitchClass;
/**
#include <cairo-gobject.h>
#include <string.h>
-#include "fallback-c89.c"
-
/**
* SECTION:gtktext
* @Short_description: A simple single-line text entry field
#include <stdarg.h>
#include <string.h>
-/* for the use of round() */
-#include "fallback-c89.c"
-
/**
* SECTION:gtkwidget
* @Short_description: Base class for all widgets
#include "gtkeditable.h"
#include "gtkentry.h"
-#include "fallback-c89.c"
-
#ifdef GDK_WINDOWING_X11
#include "x11/gdkx.h"
#endif
# List of sources that do not contain public API, and should not be
# introspected
gtk_private_sources = files([
- 'fallback-c89.c',
'fnmatch.c',
'tools/gdkpixbufutils.c',
'gsettings-mapping.c',
'getresuid',
'lstat',
'mmap',
- 'nearbyint',
'posix_fallocate',
'_lock_file',
'flockfile',
'mkstemp',
'mallinfo',
- 'round',
- 'rint',
- 'log2',
- 'exp2',
'sincos',
'sincosf',
]
endif
endforeach
-cdata.set('HAVE_DECL_ISINF', cc.has_header_symbol('math.h', 'isinf'))
-cdata.set('HAVE_DECL_ISNAN', cc.has_header_symbol('math.h', 'isnan'))
-cdata.set('HAVE_DECL_ISNANF', cc.has_header_symbol('math.h', 'isnanf'))
-
# Disable deprecation checks for all libraries we depend on on stable branches.
# This is so newer versions of those libraries don't cause more warnings with
# a stable GTK version.